@import "~pc/styles/lib_var.less";
@import "~pc/styles/lib_mixins.less";
@import "~pc/styles/lib_screen.less";

.fieldItem {
  // margin-top: 12px;
  .fieldHead {
    display: flex;
    align-items: center;

    .fieldName {
      .ellipsis();
      margin-left: 3px;
      height: 17px;
      line-height: 17px;
      font-size: 12px;
      color: var(--thirdLevelText);
      width: calc(100% - 12px);
    }
  }

  .fieldValue {
    // margin-top: 4px;
    // height: 31px;
    overflow: hidden;
    color: var(--firstLevelText);
    display: flex;
    align-items: center;
    :global {
      .expandWorkdoc {
        padding: 0;
        width: 218px;
      }
    }

    .cellHolder {
      border: solid 1px var(--fourthLevelText);
      height: 2px;
      width: 12px;
      border-radius: 2px;
    }
  }
}

.cellValue {
  padding: 4px 0px 12px 0px;
  line-height: inherit;
}

.ratingCell {
  min-height: 38px;
}

.checkboxCell {
  justify-content: flex-start;
}

.multiSelectFieldCell {
  display: flex;
  flex-wrap: nowrap;
}

.cellTitle {
  font-size: 16px;
  font-weight: bold;

  span {
    display: inline-block;
    // width: 100%;
    line-height: 1.2;
    .ellipsis();
  }
}

.cellText {
  flex-grow: 1;
  .ellipsis();
}

.cardCell {
  padding-left: 0 !important;
  margin-left: 0 !important;
}

.newItemCard {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--defaultBg);
  border-radius: 8px;
  transition: all 0.1s ease;

  &:hover {
    cursor: pointer;
    transition-duration: 0.1s;
    box-shadow: 0 8px 18px 0 var(--shadowColor);
    transform: translate3d(-1px, -1px, 0);
  }
}

.newItemBtn {
  display: flex !important;
  align-items: center;
}

.card {
  :global(.react-contextmenu-wrapper) {
    border-radius: 8px;
    overflow: hidden;
    border: none;
    transition: all 0.1s ease;
  }

  :global(.react-contextmenu-wrapper:hover) {
    cursor: pointer;
    border-color: transparent;
    transition-duration: 0.1s;
    box-shadow: 0px 8px 24px fade(#000, 16%);
    transform: translate3d(-1px, -1px, 0);
  }
}

.cardBody {
  padding: 8px 12px 0px 12px;

  & > div:first-child {
    & > div {
      padding-left: 0;
    }
  }
}

.mobilePadding {
  &:nth-of-type(2n) {
    padding-left: 0 !important;
  }
}

.boxWrapper {
  display: flex;
  align-items: center;
  justify-content: center;
}

.virtualMix() {
  .cellValue {
    padding: 0 0 8px 0;
    font-size: 13px;
  }

  &.colName {
    .cellValue {
      padding-top: 4px;
    }
  }

  .fieldHead {
    .fieldName {
      height: 18px;
      line-height: 18px;
    }
  }

  .ratingCell {
    min-height: 16px;
    & > div {
      height: 16px;
    }
  }

  .singleCell {
    height: 33px;
  }

  .isColNameHidden {
    &.singleCell {
      height: 29px;
    }
  }

  .fieldItem {
    &:last-child {
      .singleCell {
        height: 25px;
      }
    }
  }

  .cardCell {
    div, span {
      margin-top: 0;
      margin-bottom: 0;
    }
  }

  & > div:last-child {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
    div, span {
      padding-bottom: 0 !important;
      margin-bottom: 0 !important;
    }
  }
}

.virtualGallery {
  padding: 8px 12px 12px;

  .cellTitle {
    padding-top: 4px !important;
    padding-bottom: 8px;
    div, span {
      height: 14px;
      line-height: 14px;
      font-size: 14px;
    }
  }
  
  .virtualMix;
}

.virtual {

  .cellTitle {
    padding: 0 !important;
    margin-bottom: 8px;
    height: 22px;
    div, span {
      line-height: 22px;
      height: 100%;
    }
  }

  .virtualMix;
}

@media screen and (max-width: @w-md) {
  .cellTitle {
    span {
      display: inline;
    }
  }
}

.nextImage > span{
  height: 100% !important;
}
